The present invention relates to remote procedure calls (RPCs), and more particularly, this invention relates to auto-generating efficient RPC code for heterogeneous systems.
Existing RPC tools generate server stubs and client stubs based on a proprietary interface definition language (IDL). The generated code is configured for marshalling and un-marshalling on both the client side and the server side as the transmitted data is always in network order (e.g., big-endian). Marshalling may include transforming a memory representation of an object or objects to a data format suitable for storage or transmission, and is typically necessary for transporting data between processes, containers, and/or threads. Un-marshalling generally includes the opposite action of transforming the memory representation back into a data format suitable for storage or transmission. Furthermore, a type-length-value (TLV) encoding scheme is used in order to support versioning of the offered application programming interface (API) as well as the related data structures. The drawbacks of this approach are several, including overhead of marshalling and un-marshalling on both sides which is undesirable, e.g., client and server resources are utilized, runtime is increased, etc. Also, the overhead related to conversion between TLV and raw data structure is required by the caller and callee, which is also undesirable.
Accordingly, it would be beneficial to have more efficient RPC code for heterogeneous systems.